<?php namespace Home\Controller; 

use Hdphp\Controller\Controller;

//前台默认控制器
class IndexController extends Controller{
	
    //展示首页
    public function index(){
    	
    	//获得顶级分类,
    	$cateModel =new \Common\Model\Cate;
		$topCate = $cateModel->get();
		View::with('topCate',$topCate);
		// p($topCate);
       View::make();
    }
	//退出
	public function out(){
		session_unset();
		session_destroy();
		go(U('Index/index'));
	}
}
